package com.itheima.FileTest;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class PropertiesTest {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();
        FileReader fr = new FileReader("Module2\\prop.properties");

        prop.load(fr);
        fr.close();

        prop.put("zhangSan","123");
        prop.put("LiSi","123456");
        prop.put("WangWu","1237789");

        FileWriter fw = new FileWriter("Module2\\prop.properties");

        prop.store(fw," ");
        prop.clone();
    }
}
